
class AccessToken {
  String? refresh_token;
  String? expires_in;
  String? session_key;
  String? access_token;
  String? scope;
  String? session_secret;
  AccessToken();
  AccessToken.setAccessToken(
      {this.refresh_token,
      this.expires_in,
      this.session_key,
      this.access_token,
      this.scope,
      this.session_secret});
  AccessToken.formJson(Map<String, dynamic> data)
      : access_token = data["access_token"],
        refresh_token = data["refresh_token"],
        expires_in =
            data["expires_in"] != null ? data["expires_in"].toString() : "",
        session_key = data["session_key"],
        scope = data["scope"],
        session_secret = data["session_secret"];

  toJson() {
    return {
      "access_token": access_token,
      "refresh_token": refresh_token,
      "expires_in": expires_in,
      "session_key": session_key,
      "scope": scope,
      "session_secret": session_secret
    };
  }

  @override
  String toString() {
    // TODO: implement toString
    return toJson().toString();
  }
}
